home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / amos / AMOS0398.lzh / AMOSLIST / 000074_amos-request@svcs1.digex.net_Sat Mar 7 01:50:52 1998.msg < prev    next >
Text File  |  1998-04-01  |  15KB  |  453 lines

  1. >From amos-request@svcs1.digex.net  Sat Mar  7 01:50:51 1998
  2. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id BAA01782
  4.     for <mcox@access.digex.net>; Sat, 7 Mar 1998 01:50:51 -0500 (EST)
  5. Received: (from daemon@localhost)
  6.     by svcs1.digex.net (8.8.5/8.8.5) id AAA22034
  7.     for amos-out; Sat, 7 Mar 1998 00:14:22 -0500 (EST)
  8. Received: from pony-2.mail.digex.net (pony-2.mail.digex.net [204.91.241.6])
  9.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id AAA22031
  10.     for <amos-list@svcs1.digex.net>; Sat, 7 Mar 1998 00:14:21 -0500 (EST)
  11. Received: from mail1.desupernet.net (mail.desupernet.net [204.249.184.22])
  12.     by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id AAA27339
  13.     for <amos-list@access.digex.net>; Sat, 7 Mar 1998 00:14:20 -0500 (EST)
  14. Received: (qmail 9011 invoked from network); 7 Mar 1998 05:14:15 -0000
  15. Received: from unknown (HELO mushypd) (mushy-pd@208.157.100.171)
  16.   by 204.249.184.22 with SMTP; 7 Mar 1998 05:14:15 -0000
  17. From: Andy Kellett <mushypd@redrose.net>
  18. Reply-To: Andy Kellett <mushypd@redrose.net>
  19. To: amos-list@access.digex.net
  20. Date: Sat, 07 Mar 1998 00:12:51 -0400
  21. Message-ID: <yam7370.2582.3550672@mail.redrose.net>
  22. X-Mailer: YAM 2.0.0 Preview [020] - Amiga Mailer by Marcel Beck - http://www.yam.ch
  23. Organization: Mushroom PD - AMOS PD Library
  24. Subject: Using AMOSPro to send Emails
  25. MIME-Version: 1.0
  26. Content-type: multipart/mixed; boundary="BOUNDARY.3550672.1"
  27. Status: O
  28. X-Status: 
  29.  
  30. Warning: This is a message in MIME format. Your mail reader does not
  31. support MIME. Some parts of this message will be readable as plain text.
  32. To see the rest, you will need to upgrade your mail reader.
  33.  
  34.  
  35. --BOUNDARY.3550672.1
  36. Content-Type: text/plain; charset=us-ascii
  37. Content-Transfer-Encoding: quoted-printable
  38.  
  39. Since working with the GUI Extension, and also on my Mailinglist software=
  40. ,
  41. ive been asked by several AMOS users how it is possible for the betateste=
  42. rs
  43. to send their information directly to me via the net (without saving it t=
  44. o
  45. YAM/UUSPOOL first). Included in this mail, is the source code for placing=
  46.  
  47. such a form in your own creations. Attached to this mail is a file named
  48. Mailform.WIN which you should simply load as a window in your GadToolsBox=
  49.  
  50. file, and save accordingly. You will also need to change the Gui Open/Clo=
  51. se
  52. commands to react correctly with it. This program should work with Gui V1=
  53. =2E62
  54. although I haven't tried.
  55.  
  56. Feel free to use this program in your own productions, just give me and t=
  57. he
  58. PD library a mention in the documentation/in the program. If you have any=
  59.  
  60. comments/questions about this routine, feel free to email me or the list.=
  61.  
  62.  
  63. ' Simple Mailform program. Written using the GUI Extension (V1.70) =
  64.  
  65. ' Written by Andy "Mushroom" Kellett C Mushroom PD 1998. =
  66.  
  67. '
  68. ' This program is freely usable by anybody.
  69. '  =
  70.  
  71. ' Note, that you WILL have to change the GUI Open/Close commands to respo=
  72. nd
  73. ' to that of the correct one in your program. You will also need to  =
  74.  
  75. ' customize the program + SMTP servers to your own needs.
  76. '
  77.  
  78. Dim LV$(200)
  79. Global LV$()
  80.  
  81. Procedure EMAILREQUEST
  82.    ' This part of the program asks for the user's information so that the=
  83. y
  84. can
  85.    ' be contacted in the future about any new releases/updates or other i=
  86. nfo
  87.    ' which can be sent to them. It also gives me an idea of just who is
  88. using =
  89.  
  90.    ' the program, so you can determine which part of the world wishes to =
  91. use
  92. it =
  93.  
  94.    ' more.
  95.    =
  96.  
  97.    Proc COUNTRYS : Rem Read in the list of countrys to the large array
  98.    =
  99.  
  100.    Gui Open 2,10,20 : Rem Open up the GUI Screen =
  101.  
  102.    Gui Set 2,4,1,Array(LV$(0)) : Gui Set 2,4,0,0 : Rem Setup array and Fi=
  103. rst
  104. selection
  105.    =
  106.  
  107.    LP1:
  108.    A=3DGui Wait
  109.    =
  110.  
  111.    If A=3D0 : Rem SEND INFO button hit =
  112.  
  113.       Goto _PROCESS
  114.    End If =
  115.  
  116.    =
  117.  
  118.    Goto LP1
  119.    =
  120.  
  121.    _PROCESS:
  122.    ' Check the status of the gadgets to make sure no abnormalities will b=
  123. e
  124. sent =
  125.  
  126.    ' to my email box. =
  127.  
  128.    =
  129.  
  130.    NAME$=3DGui Read$(2,1) : EM$=3DGui Read$(2,2) : WWW$=3DGui Read$(2,3) =
  131. : CC$=3DGui
  132. Read$(2,4)
  133.    =
  134.  
  135.    ' First check for blank headers
  136.    If NAME$=3D"" or EM$=3D"" : Rem Blank Entry's
  137.       A=3DGui Req("Mail Error...","Blank Fields Remain in Entry","OK") : =
  138. Goto
  139. LP1
  140.    End If =
  141.  
  142.    =
  143.  
  144.    ' Now check that email contains the correct information
  145.    I=3DInstr(EM$,"@")
  146.    If I=3D0
  147.       A=3DGui Req("Mail Error...","Email address is incorrect. Please
  148. check.","OK") : Goto LP1
  149.    End If =
  150.  
  151.    =
  152.  
  153.    ' I guess its safe to say that the email is pretty good to go once it
  154. gets here  =
  155.  
  156.    ' As well as the information given in the form, the program will send =
  157. me =
  158.  
  159.    ' the following pieces of information regarding the user:
  160.    '
  161.    '       There hostname ($HOSTNAME) =
  162.  
  163.    '       There real name ($REALNAME)
  164.    '
  165.    ' This just gives me a brief idea of what will be going on with the
  166. program
  167.    =
  168.  
  169.    LP2:
  170.    SERV$=3D"mail.redrose.net" : Rem Change to your Mailserver
  171.    HOST$=3D"redrose.net" : Rem Change to your Host
  172.    _TO$=3D"mushypd@redrose.net" : Rem Change to your Email address =
  173.  
  174.    FROM$=3DEM$
  175.    EC$=3DChr$(13)+Chr$(10)
  176.    =
  177.  
  178.    If Not Exist("Ram:Env/HOSTNAME")
  179.       LP3:
  180.       TEX$=3D"It would appear that your Amiga is not"+Chr$(10)
  181.       TEX$=3DTEX$+"connected to the internet. Please connect"+Chr$(10)
  182.       TEX$=3DTEX$+"your machine to the internet, and hit the"+Chr$(10)
  183.       TEX$=3DTEX$+"RETRY button to continue. If it is connected"+Chr$(10)=
  184.  
  185.       TEX$=3DTEX$+"then please ensure the connection is OK."
  186.       =
  187.  
  188.       A=3DGui Req("Connection Error...",TEX$,"Retry") : Goto LP2
  189.    End If =
  190.  
  191.    =
  192.  
  193.    Trap A=3DTcp Open(1,SERV$+"/25") : E=3DErrtrap : Tcp Limit 500
  194.    =
  195.  
  196.    ' IMPORTANT NOTE =
  197.  
  198.    '
  199.    ' Some SMTP mailservers do not use Port 21 (SMTP) but port 25. If your=
  200.  =
  201.  
  202.    ' program doesnt work on the one port, then try the other (21). One wa=
  203. y
  204.    ' to test, is to connect to it with a Telnet program, as you should ge=
  205. t
  206.    ' a "ESMTP Server Ready" message if you connect correctly. =
  207.  
  208.    =
  209.  
  210.    If A=3DFalse or E>0
  211.       A=3DGui Req("Error.","Couldnt resolve SMTP Host","OK") : Goto LP3
  212.    End If =
  213.  
  214.    =
  215.  
  216.    Open Out 2,"Sys:MailResults"
  217.    =
  218.  
  219.    A=3DTcp Put$(1,"HELO "+HOST$+EC$)
  220.    A=3DTcp Put$(1,"MAIL FROM: <"+FROM$+">"+EC$)
  221.    A=3DTcp Put$(1,"RCPT TO: <"+_TO$+">"+EC$)
  222.    A=3DTcp Put$(1,"DATA"+EC$)
  223.    A=3DTcp Put$(1,"To: <"+_TO$+">"+EC$) : =
  224.  
  225.    A=3DTcp Put$(1,"From: My Program <"+FROM$+">"+EC$)
  226.    A=3DTcp Put$(1,"Subject: Internal Program Email"+EC$)
  227.    A=3DTcp Put$(1,"X-Comment: AMOSPro Test"+EC$)
  228.    A=3DTcp Put$(1,"X-Mailer: AMOSPro"+EC$+EC$)
  229.    =
  230.  
  231.    ' Now, another list of stuff to send. Ive put into data statements to
  232.    ' limit the amount of repetitive code used.
  233.    =
  234.  
  235.    TEX$=3D"hostname" : V=3D1 : Gosub _GETFILE
  236.    Inc V : TEX$=3D"realname" : Gosub _GETFILE
  237.    =
  238.  
  239.    D1:
  240.    Data "Name: "+NAME$,"Email Address: "+EM$,"WWW: "+WWW$,"Country: "+CC$=
  241. ,"
  242. "
  243.    Data "This Mailform was sent from My Program. The version of the"
  244.    Data "program reported itself as being:"," ",VER$," "
  245.    Data "This particular version of the program is unregistered, and was
  246. released"
  247.    Data "into the public on March 5, 1998."," "
  248.    Data "Hostname: "+HN$,"Real Name: "+RN$
  249.    Data "*"
  250.    =
  251.  
  252.    Restore D1
  253.    Repeat =
  254.  
  255.       Read G$ : Rem Read in mail input =
  256.  
  257.       If G$<>"*"
  258.          A=3DTcp Put$(1,G$+EC$) : Print #2,G$+Chr$(10);
  259.       End If =
  260.  
  261.    Until G$=3D"*"
  262.    =
  263.  
  264.    A=3DTcp Put$(1,"."+EC$)
  265.    A=3DTcp Put$(1,"QUIT"+EC$)
  266.    =
  267.  
  268.    Gui Pause 50
  269.    Tcp Close 1 : Close 2
  270.    =
  271.  
  272.    TEX$=3D"Your information has been emailed directly"+Chr$(10)
  273.    TEX$=3DTEX$+"to the author, and you will be placed on the"+Chr$(10)
  274.    TEX$=3DTEX$+"list of betatesters, and will also receive info"+Chr$(10)=
  275.  
  276.    TEX$=3DTEX$+"on new updates etc. A copy of the information"+Chr$(10)
  277.    TEX$=3DTEX$+"sent can be found in SYS:MailResults"+Chr$(10)+Chr$(10)
  278.    TEX$=3DTEX$+"Thank-you"
  279.    =
  280.  
  281.    A=3DGui Req("Mail Notification",TEX$,"No Problem!")
  282.    A=3DGui Close(2) : Gui On 1
  283.    Pop Proc
  284.    =
  285.  
  286.    End =
  287.  
  288.    =
  289.  
  290.    _GETFILE:
  291.    P$=3D""
  292.    If Exist("RAM:ENV/"+TEX$) : Rem Enviroment File
  293.       Open In 1,"Ram:Env/"+TEX$ : P$=3DInput$(1,Lof(1)) : Close 1
  294.    End If =
  295.  
  296.    =
  297.  
  298.    If V=3D1 : HN$=3DP$ : End If =
  299.  
  300.    If V=3D2 : RN$=3DP$ : End If =
  301.  
  302.    Return =
  303.  
  304.    =
  305.  
  306.    _ERROR:
  307.    TEX$=3D"An error has occured. Please check the"+Chr$(10)+"connection y=
  308. ou
  309. have to the internet"
  310.    TEX$=3DTEX$+Chr$(10)+"and hit the RETRY button. If you want
  311. to"+Chr$(10)+"abort this operation for the moment"
  312.    TEX$=3DTEX$+Chr$(10)+"then hit the CANCEL button."
  313.    =
  314.  
  315.    A=3DGui Req("Processing Error...",TEX$,"Retry|Cancel")
  316.    =
  317.  
  318.    ' 1 =3D Retry
  319.    ' 0 =3D Cancel =
  320.  
  321.    =
  322.  
  323.    If A=3D1 : Goto LP2 : End If =
  324.  
  325.    If A=3D0 : Trap Kill "MLM:Data/MailResults" : A=3DGui Close(2) : Gui O=
  326. n 1 :
  327. Pop Proc : End If =
  328.  
  329. End Proc
  330.  
  331. Procedure COUNTRYS
  332.    CT:
  333.    Data "Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and=
  334.  
  335. Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan"
  336.    Data "Bahamas,
  337. The","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Beni=
  338. n","Bhutan","Bolivia","Bosnia
  339. and Herzegovina"
  340.    Data "Botswana","Brazil","Brunei","Bulgaria","Burkina
  341. Faso","Burma","Burundi","Cambodia","Cameroon","Canada","Cape Verde"
  342.    Data "Central African
  343. Republic","Chad","Chile","China","Colombia","Comoros","Congo
  344. (Brazzaville)","Congo (Kinshasa)","Costa Rica","Cote d'Ivoire","Croatia"
  345.    Data "Cuba","Cyprus","Czech Republic","Denmark","Djibouti
  346. ","Dominica","Dominican Republic","Ecuador","Egypt","El
  347. Salvador","Equatorial Guinea"
  348.    Data
  349. "Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia,=
  350.  
  351. The","Georgia","Germany","Ghana"
  352.    Data
  353. "Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti",=
  354. "Honduras","Hungary","Iceland","India"
  355.    Data
  356. "Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","J=
  357. ordan","Kazakhstan","Kenya"
  358.    Data "Kiribati","Korea, North","Korea,
  359. South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia=
  360. ","Libya"
  361.    Data "Liechtenstein","Lithuania","Luxembourg","Macedonia, The Former
  362. Yugoslav Republic
  363. of","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall
  364. Islands"
  365.    Data "Mauritania","Mauritius","Mexico","Micronesia, Federated States
  366. of","Moldova","Monaco","Mongolia","Morocco","Mozambique","Namibia","Nauru=
  367. "
  368.    Data "Nepal","Netherlands","New
  369. Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau"=
  370. ,"Panama"
  371.    Data "Papua New
  372. Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Roma=
  373. nia","Russia","Rwanda","Saint
  374. Kitts and Nevis"
  375.    Data "Saint Lucia","Saint Vincent and the Grenadines","Samoa","San
  376. Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and
  377. Montenegro","Seychelles","Sierra Leone","Singapore"
  378.    Data "Slovakia","Slovenia","Solomon Islands","Somalia","South
  379. Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden"
  380.    Data
  381. "Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo",=
  382. "Tonga","Trinidad
  383. and Tobago","Tunisia","Turkey"
  384.    Data "Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab
  385. Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vatica=
  386. n
  387. City","Vanuatu"
  388.    Data "Venezuela","Vietnam","Yemen","Zambia","Zimbabwe",""
  389.    =
  390.  
  391.    Restore CT
  392.    L=3D0
  393.    Repeat =
  394.  
  395.       Read LV$(L) : Inc L
  396.    Until LV$(L-1)=3D""
  397. End Proc
  398.  
  399. -- =
  400.  
  401.  Email: Andy Kellett <mushypd@redrose.net>  Team *AMOS* + IAPA Team *AMIG=
  402. A*
  403.   *alt.religion.amos* - AMOS now on usenet! AMOS Mailinglist also mirrore=
  404. d
  405.  
  406. * Proud Member of the AMOSPro V3 Development Team & Official AMOS Library=
  407.  *
  408.  
  409.      World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
  410.  
  411.    Also official US distributor of  F1 Software. Quality Amiga titles at
  412.                 quality prices. See homepage for links.
  413.  
  414. --BOUNDARY.3550672.1
  415. Content-Type: application/octet-stream; name="Mailform.WIN"
  416. Content-Disposition: attachment; filename="Mailform.WIN"
  417. Content-Transfer-Encoding: base64
  418.  
  419. Rk9STQAABoJHWFdEV0REQQAAAVxJbmZvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  420. UmVnaXN0ZXIgWW91ciBWZXJzaW9uIEZSRUUhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  421. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABNYWlsaW5nbGlzdCBNYWludGFpbmVyIKkgQ29w
  422. eXJpZ2h0IDE5OTggTXVzaHJvb20gUEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO
  423. AAAAQAJ4AAAABgAAAAABiwC6AAEAAAAAAAAABAALAAAAAAAAAAAAAIAAAGQAAAB7gAAAZQAA
  424. AGSAAABmAAABk4AAAGcAAADHgAAAagJMB36AAABrAAAQBoAAAG4AVQ/UgAAAcAA2jkCAAABy
  425. AAAAQ4AAAHMAAAAVgAAAdAAAAoCAAAB1AAABkIAAAJAAAAABgAAAkwAAAAFGT1JNAAAAFkdY
  426. QlhCQk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